package zjh;

public class ProcessData implements Comparable<ProcessData>{
    private final
    int zuoyehao;
    // 到达时间
    public double arriveTime;
    // 服务时间
    public double  runTime;
    // 完成时间
    public double finishTime;
    // 周转时间
    public double turnTime;
    // 带权周转时间
    public double powerTime;

    // 作业的构造方法中传来的初值为到达时间和服务时间
    public ProcessData(int zuoyehao ,double arriveTime, double runTime) {
        this.zuoyehao = zuoyehao;
        this.arriveTime = arriveTime;
        this.runTime = runTime;
    }

    // 重写toString方法便于之后的数据展示
    @Override
    public String toString() {
        return  arriveTime + "\t\t" +
                runTime + "\t\t" +
                finishTime + "\t\t" +
                turnTime + "\t\t" +
                powerTime;
    }


    @Override
    public int compareTo(ProcessData o) {
        return (int)(arriveTime-o.arriveTime);
    }
}